package com.prs.crm.domain.oa;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;

@Entity
@Table(name="oa_task_log")
public class OaTaskLog extends BaseEntity{
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne
	private OaTaskSubmit oaTaskSubmit;
	private String title;
	private Double workload;
	private Double criteria;
	@Lob
	private String summary;
	@ManyToOne
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach;
	private String state;
	@Lob
	private String critique;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Double getWorkload() {
		return workload;
	}
	public void setWorkload(Double workload) {
		this.workload = workload;
	}
	public Double getCriteria() {
		return criteria;
	}
	public void setCriteria(Double criteria) {
		this.criteria = criteria;
	}
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getState() {
		return state;
	}
	public void setOaTaskSubmit(OaTaskSubmit oaTaskSubmit) {
		this.oaTaskSubmit = oaTaskSubmit;
	}
	public OaTaskSubmit getOaTaskSubmit() {
		return oaTaskSubmit;
	}
	public void setCritique(String critique) {
		this.critique = critique;
	}
	public String getCritique() {
		return critique;
	}	
}
